/**
 *
 * @properties={typeid:24,uuid:"D8C6AFFA-BDCE-4F50-8BCA-92FE5E3B8E83"}
 */
function cancelar() {
	_super.cancelar()
	salir()
}

/**
 *
 * @properties={typeid:24,uuid:"D6268323-BE38-4DB4-94ED-4E57844A28E8"}
 */
function guardar() {
	if (_super.guardar() == true)
	{
		salir()
	}
}

/**
 * @properties={typeid:24,uuid:"5B49A2BA-FFB4-4D7C-A629-27B699EC2F64"}
 */
function salir()
{
	databaseManager.setAutoSave(true)
	var $win = application.getWindow('ALTA_HAB')
	$win.hide()
	$win.destroy()
}

/**
 * @param {Boolean} firstShow
 * @param {JSEvent} event
 *
 * @properties={typeid:24,uuid:"7CAF43DB-692C-40C6-8AF4-5002A673EA9E"}
 */
function onShow(firstShow, event) {
	_super.onShow(firstShow,event)
	controller.newRecord()
}
